import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 18,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: true,
    addBtnText: '新增',
    editBtn: true,
    delBtn: true,
    viewBtn: true,
    searchLabelWidth: 120,
    column: [
      {
        label: '航运公司名称',
        search: true,
        prop: 'p1',
      },
      {
        label: '加入年度',
        search: true,
        type: 'year',
        prop: 'p2',
      },
      {
        label: '是否取消',
        prop: 'p3',
        search: true,
        type: 'select',
        dicData: [
          {label:'是', value:'0'},
          {label:'否', value:'1'},
        ],
      },
      {
        label: '取消年度',
        prop: 'p4',
        search: true,
        type: 'year',
      },
      {
        label: '取消原因',
        prop: 'p5',
        search: true,
      },
    ]
  }
}

export const tableOption2 = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    searchLabelWidth: 120,
    cellBtn: true,
    addRowBtn: true,
    editRowBtn: true,
    column: [
      {
        label: '问题描述',
        prop: 'p1',
        cell: true,
      },
    ]
  }
}